package com.eatme.web.common;

import com.eatme.web.common.vo.ResponseCode;

public class CMSException extends RuntimeException {

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public CMSException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public CMSException(ResponseCode responseCode) {
        super(responseCode.getMessage());
        this.code = responseCode.getCode();
    }

    @Override
    public String toString() {
        return "CMSException{" +
                "code=" + code +
                '}';
    }
}
